package com.qczl.pme.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 会议记录表
 * @author SongR
 *
 */
@Entity
@Table(name = "pme_metting_record")
public class PMEMetting implements Serializable{
	private static final long serialVersionUID = -740937519518250383L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "metting_id")
	private Long id;//会议编号
	@Column(name = "metting_starttime")
	private Date starttime;//开始时间
	@Column(name = "metting_endtime")
	private Date endtime;//结束时间
	@Column(name = "metting_summary")
	private String summary;//会议纪要
	@Column(name = "metting_desc")
	private String desc;//会议描述
	@Column(name = "metting_status")
	private Integer status;//(-1、已删除 0、已结束 1、开会中2、签到中)
	
	@ManyToOne(cascade = CascadeType.ALL,fetch=FetchType.EAGER)
	@JoinColumn(name = "topic_id", referencedColumnName = "topic_id",nullable=false)
	private PMETopic topic;//会议主题类型
	
	@ManyToOne(cascade = CascadeType.ALL,fetch=FetchType.EAGER)
	@JoinColumn(name = "camera_id", referencedColumnName = "camera_id",nullable=false)
	private PMECamera camera;//会议室
	
	@ManyToMany(cascade = CascadeType.ALL,fetch=FetchType.EAGER)
	@JoinTable(name = "pme_basis_metting_person", joinColumns = @JoinColumn(name = "metting_id") , inverseJoinColumns = @JoinColumn(name = "person_id") )
	private Set<PMEPerson> persons;//参会人员

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	public Date getStarttime() {
		return starttime;
	}


	public void setStarttime(Date starttime) {
		this.starttime = starttime;
	}


	public Date getEndtime() {
		return endtime;
	}


	public void setEndtime(Date endtime) {
		this.endtime = endtime;
	}


	public String getSummary() {
		return summary;
	}


	public void setSummary(String summary) {
		this.summary = summary;
	}


	public String getDesc() {
		return desc;
	}


	public void setDesc(String desc) {
		this.desc = desc;
	}


	public Integer getStatus() {
		return status;
	}


	public void setStatus(Integer status) {
		this.status = status;
	}

	public PMECamera getCamera() {
		return camera;
	}


	public void setCamera(PMECamera camera) {
		this.camera = camera;
	}


	public Set<PMEPerson> getPersons() {
		return persons;
	}


	public void setPersons(Set<PMEPerson> persons) {
		this.persons = persons;
	}

	public PMETopic getTopic() {
		return topic;
	}

	public void setTopic(PMETopic topic) {
		this.topic = topic;
	}
	
}
